home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
util
/
cdity
/
ModeProSrc.lha
/
Prefs
/
MPP_UpdateUI.c
< prev
next >
Wrap
C/C++ Source or Header
|
1998-08-05
|
865b
|
44 lines
#include "mppexterns.h"
void RefreshMenus(void)
{
CheckMenuItem(M_ENABLED ,MPSem->Enabled);
CheckMenuItem(M_ENABLENL ,MPSem->EnabledNLM);
CheckMenuItem(M_SET_UNKNOWN ,MPSem->CatchScreens);
CheckMenuItem(M_SET_UNKNOWN_PUB ,MPSem->CatchPubScreens);
CheckMenuItem(M_SET_CENTER_H,MPSem->CenterAll & 1);
CheckMenuItem(M_SET_CENTER_V,MPSem->CenterAll & 2);
ResetMenuStrip(Win,MenuStrip);
}
void CheckMenuItem(ULONG MenuItem, BOOL Checked)
{
struct MenuItem *mi;
if(mi=ItemAddress(MenuStrip,MenuItem))
{
if(Checked)
mi->Flags|=CHECKED;
else
mi->Flags&=(~CHECKED);
}
}
struct NewMenu *FindNM(struct NewMenu *Array, APTR UserData)
{
struct NewMenu *nm;
nm=Array;
while(nm->nm_UserData!=UserData && nm->nm_Type!=NM_END)
nm++;
if(nm->nm_Type==NM_END)
{
return(0);
}
return(nm);
}